package org.nstack.storage.primary.nfs;

import org.springframework.http.HttpMethod;
import org.nstack.header.rest.RestRequest;
import org.nstack.header.storage.primary.APIAddPrimaryStorageEvent;
import org.nstack.header.storage.primary.APIAddPrimaryStorageMsg;
import org.nstack.header.storage.primary.PrimaryStorageVO;
import org.nstack.header.tag.TagResourceType;


@TagResourceType(PrimaryStorageVO.class)
@RestRequest(
        path = "/primary-storage/nfs",
        method = HttpMethod.POST,
        responseClass = APIAddPrimaryStorageEvent.class,
        parameterName = "params"
)
public class APIAddNfsPrimaryStorageMsg extends APIAddPrimaryStorageMsg {
    public APIAddNfsPrimaryStorageMsg() {
        this.setType(NfsPrimaryStorageConstant.NFS_PRIMARY_STORAGE_TYPE);
    }

    @Override
    public String getType() {
        return NfsPrimaryStorageConstant.NFS_PRIMARY_STORAGE_TYPE;
    }
 
    public static APIAddNfsPrimaryStorageMsg __example__() {
        APIAddNfsPrimaryStorageMsg msg = new APIAddNfsPrimaryStorageMsg();

        msg.setName("PS1");
        msg.setUrl("192.168.0.25:/share/nfs");
        msg.setZoneUuid(uuid());
        return msg;
    }

}
